1. Field of the Invention
The present invention relates to a bar-code reading apparatus and a computer-readable medium.
2. Description of Related Art
When a defective bar-code (see FIG. 24) which is poor in printing quality or which is partially damaged is read by a one-dimensional scanner having an optical source such as laser light, the bar-code may not be decoded because it cannot be correctly read depending on a position where light is irradiated. Since a bar-code is actually read in such a way that a user holds a scanner in her/his hand, various positions on a surface of the bar-code are read due to the movement of the hand of the user. For this reason, when the defective bar-code as shown in FIG. 24 is read, as shown in FIG. 25, multiple pieces of image data obtained by a plurality of reading operations having different light irradiation positions (irradiation lines) depending on the movement of the hand of the user are stored in a memory, the multiple pieces of image data are synthesized to produce accurate image data by combining the pieces of image data, and then a decode process is carried out (for example, see Japanese Patent Application Laid-Open No. 7-57035).
As described above, however, since the bar-code reading operation is carried out in such a way that a user holds a scanner in her/his hand, a light irradiation position during the reading operation variably changes due to the movement of the hand of the user. For example, the light irradiation position not only vertically moves as shown in FIG. 25 but also moves in an alignment direction of bars or is inclined with respect to the alignment direction. Therefore, if the multiple pieces of image data obtained by a plurality of reading operations are synthesized without modification, an accurate reading result cannot be obtained.
In order to obtain data of a bar-code having a width larger than a read range of a scanner, a user must scan the bar-code while moving the scanner with respect to a surface of the bar-code. In a conventional technique, in order to obtain bar-code data by scanning the wide bar-code, a user scans the bar-code at a predetermined scanning rate (for example, 100 scans/second) while moving the scanner in an alignment direction of bars. Each time the scan is performed, pattern matching for the bar-code is carried out, and synthesis is carried out little by little on the basis of the matched parts (for example, see Japanese Patent Application Laid-Open No. 7-57035).
However, because the pattern matching for a bar-code is carried out every time the scan is performed, the numbers of the pattern matching and the synthesis process increase as a moving distance of a scanner per scan becomes short. Hence, there arises a problem that processing efficiency is reduced.